#ifndef ODN_OGREINPUTDEVICE_H
#define ODN_OGREINPUTDEVICE_H

#include <ogre\Ogre.h>

#include "ODN_InputDevice.h"
#include "ODN_Maths.h"

namespace ouden {

//Abstract input device interface
class COgreInputDevice : public IInputDevice
{
	public:
		
		COgreInputDevice(Ogre::EventProcessor* pEventProcessor);
		virtual ~COgreInputDevice();
		
		//Captures the state of input devices
		virtual void captureInput() 				{ m_pInputReader->capture(); }
		
		virtual bool isKeyDown(KeyCode iKey) 		{ return m_pInputReader->isKeyDown(Ogre::KeyCode(iKey)); }
		virtual Vector getMousePos() 				{ return Vector(m_pInputReader->getMouseAbsX(), 
																	m_pInputReader->getMouseAbsY()); }
		virtual Vector getMouseRel() 				{ return Vector(m_pInputReader->getMouseRelX(), 
																	m_pInputReader->getMouseRelY()); }
		virtual bool isMouseButtonDown(MouseButton iButton) 		{ return m_pInputReader->getMouseButton(iButton); }
		//TODO: Add mouse displacement vector and more
		
	protected:
		
	private:
		
		Ogre::InputReader* 		m_pInputReader; 		//Object to get input
		
};

} //namespace ouden

#endif //ODN_OGREINPUTDEVICE_H
